
import request from '@/utils/request'
import api from './config'
const host = api.apiHost

// 客户列表
export function getCustomerList(params) {
  return request({
    url: host + '/customer/list',
    method: 'get',
    params
  })
}

// 新增客户
export function saveCustomer(data) {
  return request({
    url: host + '/customer/save',
    method: 'post',
    data
  })
}

// 修改客户
export function updateCustomer(data) {
  return request({
    url: host + '/customer/update',
    method: 'post',
    data
  })
}

// 获取客户详情
export function getCustomer(params) {
  return request({
    url: host + '/customer/detail',
    method: 'get',
    params
  })
}

// 删除客户
export function deleteCustomer(data) {
  return request({
    url: host + '/customer/delete',
    method: 'post',
    data
  })
}

// customer​/dropDown
export function getCustomerSelect(params) {
  return request({
    url: host + '/customer/dropDown',
    method: 'get',
    params
  })
}

// 线索转移
export function transferCustomer(data) {
  return request({
    url: host + '/customer/transfer',
    method: 'post',
    data
  })
}

// /customer/updateStatus
export function updateStatusCustomer(data) {
  return request({
    url: host + '/customer/updateStatus',
    method: 'post',
    data
  })
}
// /customer/listHome
export function getCustomerListHome(params) {
  return request({
    url: host + '/customer/listHome',
    method: 'get',
    params
  })
}
